﻿<div class="row" ng-controller="baseImponibleController">
    <form class="form-horizontal" ng-submit="save()" ng-show="formVisibility" novalidate>
        <div class="form-group">
            <label class="control-label col-xs-3">Nombre:</label>
            <div class="col-xs-8">
                <input type="text" class="form-control" placeholder="Nombre" ng-model="baseImponible.Nombre" required>
            </div>
        </div>
        <br>
        <div class="form-group">
            <div class="col-xs-offset-9">
                <button type="button" class="btn btn-default" ng-click="cancel()">Cancel </button>
                <button class="btn btn-success" type="submit">Save</button>
                <input type="reset" class="btn btn-default btn-primary" value="Limpiar">
            </div>
        </div>
    </form>
    <div class="container">
        <h3>LISTA DE BASES IMPONIBLES</h3>
        <table class="table table-bordered table-striped">
            <tr>
                <th>Id</th>
                <th>Nombre</th>
                <th>Opciones</th>
            </tr>

            <tr ng-repeat="d in list">
                <td>{{d.Id}}</td>
                <td>{{d.Nombre}}</td>
                <td>
                    <button ng-click="getById(d)" type="button" class="btn btn-primary"><i class="glyphicon glyphicon-pencil"></i> <span>Editar</span></button>
                    <button ng-click="delete(d)" type="button" class="btn btn-danger"><i class="glyphicon glyphicon-trash"></i> <span>Eliminar</span></button>
                </td>

            </tr>
        </table>

    </div>
    <button ng-click="ShowForm()" ng-hide="formVisibility" type="button" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i> Agregar...</button>
</div>